public class Main {
    public static void main1(String[] args) {
        float sum = 0;
        int flag = 1;
        for (int i = 1; i <= 100; i++) {

            sum += 1.0/i*flag;
            flag =-flag;
        }
        System.out.println(sum);

    }
    public static void main(String[] args) {

        //System.out.println("Hello world!");
        int count = 0;
        for (int i = 1; i <= 100; i++) {
            //这个判断十位是9
            if(i/10==9){
                count++;
            }
            if(i%10==9){
                count++;
            }

        }
    }

}

//求1-100里，含有的9的个数
//其实就是判断个位和十位
//个位：